﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using Vega.USiteBuilder;

namespace PBDesk.Web.DocumentTypes
{
    [DocumentType(Description = "UmbracoRootDocType(V 2.0 Dt 10/Mar/2011) All the document types must inherit this type.")]
    public class UmbracoRootDocType : Vega.USiteBuilder.DocumentTypeBase
    {
        #region Tab - Meta

        /// <summary>
        /// Page Title 
        /// </summary>
        [DocumentTypeProperty(UmbracoPropertyType.Textstring, 
                                Name = "Page Title", 
                                Tab = "Meta", 
                                Mandatory = true, 
                                DefaultValue = "PBDesk.com", 
                                Description = "Page Title")]
        public string pageTitle { get; set; }

        /// <summary>
        /// Meta Tag Description  (optional) - Contents for Page's meta tag description. Text 
        /// </summary>
        [DocumentTypeProperty(UmbracoPropertyType.TextboxMultiple,
                                Name = "Meta Tag Description",
                                Tab = "Meta",
                                Mandatory = false,
                                DefaultValue = "",
                                Description = "Meta Tag Description (optional) - Contents for Page's meta tag description. Text")]
        public string metaDescription { get; set; }

        /// <summary>
        /// Meta Tag Keywords (optional) - short comma separated list of page keywords for Meta Tag.
        /// </summary>
        [DocumentTypeProperty(UmbracoPropertyType.Textstring,
                                Name = "Meta Tag Keywords",
                                Tab = "Meta",
                                Mandatory = false,
                                DefaultValue = "",
                                Description = "Meta Tag Keywords (optional) - short comma separated list of page keywords for Meta Tag.")]
        public string metaKeywords { get; set; }

        /// <summary>
        /// Open Graph Page Type (optional) - For Facebook "Like" button
        /// </summary>
        [DocumentTypeProperty(UmbracoPropertyType.Textstring,
                                Name = "OpenGraphPageType",
                                Tab = "Meta",
                                Mandatory = false,
                                DefaultValue = "",
                                Description = "Open Graph Page Type (optional) - For Facebook Like button. http://developers.facebook.com/docs/opengraph/#types ")]
        public string openGraphPageType { get; set; }

        /// <summary>
        /// SEO Sitemap Change Frequency
        /// </summary>
        [DocumentTypeProperty(UmbracoPropertyType.Textstring,
                                Name = "SEO Sitemap Change Frequency",
                                Tab = "Meta",
                                Mandatory = false,
                                DefaultValue = "monthly",
                                Description = "SEO Sitemap Change Frequency. Valid values: always, hourly, daily, weekly, monthly, yearly, never ")]
        public string searchEngineSitemapChangeFreq { get; set; }

        /// <summary>
        /// SEO Sitemap Priority
        /// </summary>
        [DocumentTypeProperty(UmbracoPropertyType.Textstring,
                                Name = "SEO Sitemap Priority",
                                Tab = "Meta",
                                Mandatory = false,
                                DefaultValue = "0.5",
                                Description = "SEO Sitemap Priority. Valid values: 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0 ")]
        public string searchEngineSitemapPriority { get; set; }

        #endregion

        #region Tab - Root

        /// <summary>
        /// Body Text
        /// </summary>
        [DocumentTypeProperty(UmbracoPropertyType.RichtextEditor,
                                Name = "Body Text",
                                Tab = "Root",
                                Mandatory = false,
                                Description = "Body Text - Main chunk of text content for the page.")]
        public string bodyText { get; set; }

        /// <summary>
        /// Head Text - Anything that needs to be added to Head tag.
        /// </summary>
        [DocumentTypeProperty(UmbracoPropertyType.SimpleEditor,
                                Name = "Head Text",
                                Tab = "Root",
                                Mandatory = false,
                                Description = "Head Text - Anything that needs to be added to Head tag.")]
        public string headText { get; set; }


        #endregion

        #region Tab -  Generic Properties

        #region Umbraco built-in Properties

        /// <summary>
        /// Umbraco Url Name
        /// </summary>
        [DocumentTypeProperty(UmbracoPropertyType.Textstring,
                                Name = "Umbraco Url Name",
                                Mandatory = false,
                                Description = "Umbraco Url Name. This property allows you to change the URL of the node without changing the name of the node/page you have created.")]
        public string umbracoUrlName { get; set; }

        /// <summary>
        /// Umbraco Url Alias
        /// </summary>
        [DocumentTypeProperty(UmbracoPropertyType.Textstring,
                                Name = "Umbraco Url Alias",
                                Mandatory = false,
                                Description = "Umbraco Url Alias. provides multiple URLs for a content node. Comma-separated values. Values you use must be lowercase, not use a leading slash and not use a trailing .aspx")]
        public string umbracoUrlAlias { get; set; }

        /// <summary>
        /// Umbraco Redirect
        /// </summary>
        [DocumentTypeProperty(UmbracoPropertyType.ContentPicker,
                                Name = "Umbraco Redirect",
                                Mandatory = false,
                                Description = "Umbraco Redirect. Choose a node ID that you want the page to redirect to.")]
        public int? umbracoRedirect { get; set; }

        /// <summary>
        /// Hide from navigation?
        /// </summary>
        [DocumentTypeProperty(UmbracoPropertyType.TrueFalse,
                                Name = "Hide from navigation?",
                                Mandatory = false,
                                Description = "Hide from navigation?. Hide pages from the navigation when they are set to true.")]
        public bool umbracoNaviHide { get; set; }

        /// <summary>
        /// Umbraco Internal Redirect Id
        /// </summary>
        [DocumentTypeProperty(UmbracoPropertyType.ContentPicker,
                                Name = "Umbraco Internal Redirect Id",
                                Mandatory = false,
                                Description = "Umbraco Internal Redirect Id. This will load the selected page’s content transparently; no url redirection.")]
        public int? umbracoInternalRedirectId { get; set; }


        #endregion

        #region Custom Generic Properties

        /// <summary>
        /// Show In Footer?
        /// </summary>
        [DocumentTypeProperty(UmbracoPropertyType.TrueFalse,
                                Name = "Show In Footer?",
                                Mandatory = false,
                                DefaultValue=false,
                                Description = "Show In Footer?")]
        public bool showInFooter { get; set; }

        /// <summary>
        /// Sidebar Widgets
        /// </summary>
        [DocumentTypeProperty(UmbracoPropertyType.Other,
                                OtherTypeName = "PBDeskSidebarWidgetPicker",
                                Name = "Sidebar Widgets",
                                Mandatory = false,
                                DefaultValue = false,
                                Description = "Show In Footer?")]
        public string sidebarWidgets { get; set; }

        #endregion

        #endregion
    }
}
